package com.conpany.project;

/**
 * @Author: zhaoqi
 * @Date: 8/25/2019 6:03 PM
 * @Version 1.0
 */


// 懒汉式单例模式
public class Singleton2 {

    private Singleton2(){}

    private static Singleton2 singleton2 = null;

    public static Singleton2 getInstance(){
        if (singleton2 == null){
            singleton2 = new Singleton2();
        }
        return singleton2;
    }


}
